package com.air.controller;

import com.air.entity.City;
import com.air.service.CityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
public class CityController {

    @Autowired
    CityService cityService;

    @RequestMapping(value = "/city",method = RequestMethod.GET)
    @ResponseBody
    public List<City> selectCity(){
        return cityService.selectCity();
    }
}
